<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" onsubmit="return navTabSearch(this)">
<input type="hidden" id="advancedStatus" name="advancedStatus"
                value="<#if (condition.advancedStatus)??>${condition.advancedStatus!''}</#if>">
    <div class="pageHeader">
        <div class="searchBar">
            <ul class="searchContent">
            <li>
                <label>
                    <@label key='equipmentCode.C,colon'>设备编号：</@label>
                </label>
                <input type="text" name="equipmentCode" value="${condition.equipmentCode!''}"/>
            </li>
            <li>
                <label>
                    <@label key='equipmentText.C,colon'>设备描述：</@label>
                </label>
                <input type="text" name="equipmentText" value="${condition.equipmentText!''}"/>
            </li>
            </ul>
            <ul class="searchContent">
                <li><label id="strategyCode"><@label key="strategyCode.C,colon">维护策略编号：</@label></label> <input type="text" name="strategyCode" value="${condition.strategyCode!''}" /></li>
                <li><label id="strategyText"><@label key="strategyText.C,colon">维护策略描述：</@label></label> <input type="text" name="strategyText" value="${condition.strategyText!''}" /></li>
                <li class="query">
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit"><@label key="query.B">查询</@label></button>
                        </div>
                    </div>
                </li>
                <li class="advancedQuery" >            
                <a href="javascript:void(0);"   onclick="openAdvanced(navTab.getCurrentPanel());">
                    <@label key="advancedQuery.C">高级查询</@label>
                </a>
                <span  onclick="openAdvanced(navTab.getCurrentPanel());"></span>            
            </li>
            </ul>
        </div>
    </div>
    <div id="collapsablePanel" style="display: none;" class="pageHeader">
        <div class="searchBar poStatus">
        <ul class="searchContent">
            <li><label><@label key="prevMaintainDate.C,colon">上次维护日期：</@label></label> 
                <input type="text" readonly="readonly" style="background-color:#fff;" name="prevMaintainDateSt" dateFmt="yyyy-MM-dd" class="date" value="<#if (condition.prevMaintainDateSt)??>${condition.prevMaintainDateSt?string("yyyy-MM-dd")}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
                <li>
                <label><@label key="to.C,colon">至：</@label></label>
                <input  type="text" readonly="readonly" style="background-color:#fff;" name="prevMaintainDateEd" dateFmt="yyyy-MM-dd" class="date" value="<#if (condition.tprevMaintainDateEd)??>${condition.prevMaintainDateEd?string("yyyy-MM-dd")}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
                <li><label><@label key="memo.C,colon">备注：</@label></label> <input type="text" name="memo" value="${condition.memo!''}" /></li>
            </ul>
            <ul class="searchContent">
                <li><label><@label key="nextMaintainDate.C,colon">下次维护日期：</@label></label> 
                <input type="text" readonly="readonly" style="background-color:#fff;" name="nextMaintainDateSt" dateFmt="yyyy-MM-dd" class="date" value="<#if (condition.nextMaintainDateSt)??>${condition.nextMaintainDateSt?string("yyyy-MM-dd")}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
                <li>
                <label><@label key="to.C,colon">至：</@label></label>
                <input  type="text" readonly="readonly" style="background-color:#fff;" name="nextMaintainDateEn" dateFmt="yyyy-MM-dd" class="date" value="<#if (condition.nextMaintainDateEn)??>${condition.nextMaintainDateEn?string("yyyy-MM-dd")}</#if>" /> <a class="inputDateButton" href="javascript:;"><@label key="select.B">选择</@label></a>
                </li>
            </ul>
            <ul class="searchContent">
                <li><label><@label key="currCountValue.C,colon">当前损耗点：</@label></label> 
                <input type="text" name="currCountValueSt" value="${condition.currCountValueSt!''}"/>
                </li>
                <li>
                <label><@label key="to.C,colon">至：</@label></label>
                <input type="text" name="currCountValueEn" value="${condition.currCountValueEn!''}"/>
                </li>
            </ul>
            <ul class="searchContent">
                <li><label><@label key="totalCountValue.C,colon">累计损耗点：</@label></label> 
                <input type="text" name="totalCountValueSt" value="${condition.totalCountValueSt!''}"/>
                </li>
                <li>
                <label><@label key="to.C,colon">至：</@label></label>
                <input type="text" name="totalCountValueEn" value="${condition.totalCountValueEn!''}"/>
                </li>
            </ul>
        </div>
    </div>
</form>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <@buttonRight menuCode="MAINTAINCONFIG_ADD" labelKey="add.B" defalutName="新增">
            <li><a class="add" target="dialog" mask="true" width="640" height="430" rel="config_add" href="${rc.getContextPath()}/manage/maintainConfig/addMaintainConfig?navTabId=${navTabId!''}" title="<@label key='addMaintainConfig.D'>新增设备维护配置</@label>"><span><@label key="add.B">新增</@label></span> </a>
            </li> </@buttonRight> <@buttonRight menuCode="MAINTAINCONFIG_EDIT" labelKey="edit.B" defalutName="编辑">
            <li><a class="edit" target="dialog" mask="true" width="640" height="580" rel="config_tab" href="${rc.getContextPath()}/manage/maintainConfig/modifyMaintainConfig?id={config_code}&navTabId=${navTabId!''}" title="<@label key='editMaintainConfig.D'>编辑设备维护配置</@label>"><span><@label key="edit.B">编辑</@label></span> </a>
            </li> </@buttonRight> <@buttonRight menuCode="MAINTAINCONFIG_VIEW" labelKey="view.B" defalutName="详情">
            <li><a class="icon" target="dialog" mask="true" width="640" height="430" rel="config_tab" href="${rc.getContextPath()}/manage/maintainConfig/viewMaintainConfig?id={config_code}&navTabId=${navTabId!''}" title="<@label key='viewMaintainConfig.D'>设备维护配置详情</@label>"><span><@label key="view.B">详情</@label></span> </a>
            </li> </@buttonRight> <@buttonRight menuCode="MAINTAINCONFIG_DEL" labelKey="delete.B" defalutName="删除">
            <li><a class="delete" target="selectedTodo" callback="batchjobAjaxDone" href="${rc.getContextPath()}/manage/maintainConfig/deleteMaintainConfig?navTabId=${navTabId!''}" postType="string" rel="ids" title="<@label key='confirmDelMaintainConfig.M'>确认要删除选择的设备维护配置吗？</@label>"><span><@label key="delete.B">删除</@label></span> </a>
            </li> </@buttonRight>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="160" style="overflow: scroll;">
        <thead>
            <tr>
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl">
                </th>
                <th width="40"><@label key="serialNumber.C">序号</@label></th>
                <th width="100" orderField="equipmentCode"<#if (page.orderField?? && page.orderField == 'equipmentCode')>class="${page.orderDirection!''}"</#if>><@label key="equipmentCode.C">设备编号</@label></th>
                <th width="100" orderField="equipmentText"<#if (page.orderField?? && page.orderField == 'equipmentText')>class="${page.orderDirection!''}"</#if>><@label key="equipmentText.C">设备描述</@label></th>
                <th width="100" orderField="strategyCode"<#if (page.orderField?? && page.orderField == 'strategyCode')>class="${page.orderDirection!''}"</#if>><@label key="strategyCode.C">维护策略编号</@label></th>
                <th width="100" orderField="strategyText"<#if (page.orderField?? && page.orderField == 'strategyText')>class="${page.orderDirection!''}"</#if>><@label key="strategyText.C">维护策略描述</@label></th>    
                <th width="100" orderField="prevMaintainDate"<#if (page.orderField?? && page.orderField == 'prevMaintainDate')>class="${page.orderDirection!''}"</#if>><@label key="prevMaintainDate.C">上次维护日期</@label></th>    
                <th width="100" orderField="nextMaintainDate"<#if (page.orderField?? && page.orderField == 'nextMaintainDate')>class="${page.orderDirection!''}"</#if>><@label key="nextMaintainDate.C">下次维护日期</@label></th>
                <th width="100" orderField="currCountValue"<#if (page.orderField?? && page.orderField == 'currCountValue')>class="${page.orderDirection!''}"</#if>><@label key="currCountValue.C">当前损耗点</@label></th>    
                <th width="100" orderField="totalCountValue"<#if (page.orderField?? && page.orderField == 'totalCountValue')>class="${page.orderDirection!''}"</#if>><@label key="totalCountValue.C">累计损耗点</@label></th>        
            </tr>
        </thead>
        <tbody>
            <#if page??><#if (page.data?size>0)> <#list page.data as config>
            <tr target="config_code" rel="${config.equipmentCode!''};${config.strategyCode!''}">
                <td><input name="ids" value="${config.equipmentCode!''};${config.strategyCode!''}" type="checkbox"></td>
                <td>${page.startRow + config_index}</td>
                <td>${config.equipmentCode!''}</td>
                <td>${config.equipmentText!''}</td>
                <td>${config.strategyCode!''}</td>
                <td>${config.strategyText!''}</td>
                <td>${(config.prevMaintainDate?string("yyyy-MM-dd"))?if_exists}</td>
                <td>${(config.nextMaintainDate?string("yyyy-MM-dd"))?if_exists}</td>
                <td>${config.currCountValue!''}</td>
                <td>${config.totalCountValue!''}</td>
                

            </tr>
            </#list> <#else>
            <tr target="config_id">
                <td colspan="6" class="noData">======<@label key="noListData.C">列表无数据</@label>=====</td>
            </tr>
            </#if> <#else>
            <tr target="config_id">
                <td colspan="6" class="noData">======<@label key="noListData.C">列表无数据</@label>=====</td>
            </tr>
            </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
</div>

<script type="text/javascript">
$(function() {
    initAdvancedQuery(navTab.getCurrentPanel());
});


</script>